package com.apexedu.eas.dao.impl;


import java.util.List;

import org.springframework.stereotype.Repository;

import com.apexedu.eas.annotation.Query;
import com.apexedu.eas.entity.TyxDzjl;
import com.apexedu.eas.entity.TyxDzmxjl;
import com.apexedu.eas.entity.TyxXsyshj;
import com.apexedu.eas.vo.VyxGxxs;
import com.apexedu.eas.vo.response.Bill;
import com.apexedu.eas.vo.response.Detail;
import com.apexedu.eas.vo.response.Item;
import com.apexedu.eas.vo.response.Sub;

@Repository
public class TyxXsyshjDao extends BasisDao<TyxXsyshj, Long> {

	
	// 查询
	@Query(value = "select orgid from lbmember where roleid=(select id from lbrole where rolecode='PKCZR') and userid= ? ")
	public Object getOrgIdByUserId(String userId) {
		return null;
	}
	@Query(value = " SELECT XM xm ,  ( select DM from T_SJZX_DMJZX WHERE ID = GBT_XBDM  )xb ,XH xh  FROM TJX_XSLQ where KSH = ? ")
	public VyxGxxs getXslqByKsh(String ksh) {
		return null;
	}
	
	@Query(value = "select to_char(fy.id) subid ,lx.fylx subname ,nvl(fy.fy,'0') m_amt ,nvl(fy.fy,'0') subamt ,'1' ismust   from TJX_XSLQ xs left join TYX_SFBZ fy on fy.zy = xs.zy left join TYX_FYLX lx on lx.id = fy.fylx where KSH = ?  ")
	public List<Sub> getSublistByKsh(String ksh) {
		return null;
	}
	
	@Query(value = "select to_char(ys.id) feeid ,pc.pc feename ,'20'||substr(ys.ksh,0,2) year , to_char(nvl(ys.yshj,'0'))  m_amt , to_char(nvl(ys.lstd ,'0')) detect_amt,to_char(nvl(ys.hjje ,'0')) delay_amt ,to_char(nvl(ys.yshj,'0')-nvl(ys.hjje,'0')-nvl(ys.lstd,'0')) amt, '1' ismust from TYX_XSYSHJ ys   "+
	" left join TYX_YXPC pc on ys.sfpc = pc.id  where ys.ksh = ? and serialnum is null ")
	public  List<Item> getItemlistByKsh(String ksh) {
		return null;
	}
	
	@Query(value = "from TyxXsyshj where ksh = ? and id = ? " , nativeQuery=false)
	public TyxXsyshj getTyxXsyshjByKsh(String ksh ,String feeId) {
		return null;
	}
	
	@Query(value = "select to_char(COUNT(ID)) num , to_char(NVL(SUM(SJJE), 0)) amt from TYX_XSYSHJ WHERE settledate =? ")
	public Bill getBillBySettledate(String settledate) {
		return null;
	}
	
	@Query(value = "select usr_yx.fnextid('#{tabName}') from dual " ,splice=true)
	public Object getNextId(String tabName) {
		return null;
	}
	
	@Query("select sjje amt ,serialnum order_no from TYX_XSYSHJ where serialnum = ?")
	public Detail getDetailByOrderNo(String order_no) {
		return null;
	}
	
	public void addDzjl(TyxDzjl dzjl ){
		baseDao.save(dzjl);
	}
	
	public void addDzmxjl(TyxDzmxjl dzmxjl) {
		baseDao.save(dzmxjl);
	}
	

	
}
